<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vue3.js"></script>
</head>
<body>
    
    <div id="app">
        <p>{{num}}</p>
        <p>{{uname}}</p>
    </div>
    
    <script>
        const Counter={// 配置对象
            data:function(){
                return {
                    num:0,
                    uname:"张三"
                }
            }
        }

        let app = Vue.createApp(Counter).mount('#app')  // 创建应用，将配置对象传入
        console.log(app)
        // mount()   将div元素和应用进行挂载
        // app.num=4  页面上也会随之修改，数据的双向绑定
    </script>
</body>
</html>